<script>
/*
 * @Author: wzh 
 * @Date: 2020-12-31 00:07:38 
 * @Last Modified by: 1521620993@qq.com
 * @Last Modified time: 2020-12-31 00:21:13
 */
</script>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>05-绝对定位与固定定位的共同点</title>
</head>
<body>
  <style>
    .box1{
      width: 100px;
      height: 100px;
      background-color: red;
      position: absolute;
      top: 0;
      left: 0;
      margin-bottom: 100px;
      /* margin-top: 100px; */
    }
    .box2{
      width: 100px;
      height: 100px;
      background-color: blue;
      position: absolute;
      left: 0px;
      top: 100px;
      margin-top: 100px;
    }
  </style>
  <span class="box1"></span>
  <span class="box2"></span>
</body>
</html>